import request from '@/utils/request'



export function getTaughtCourseAPI(params){
  return request({
    url: '/courses/page',
    params
  })
}
export function exportExcelAPI(params) {
  return request({
    url: '/courses/exportExcel',
    method: 'GET',
    responseType: 'blob', 
    params
  });
}

export function exportExcel2API(params) {
  return request({
    url: '/courses/exportExcel2',
    method: 'GET',
    responseType: 'blob', 
    params
  });
}
export function generateScoreAPI(params){
  return request({
    url: '/courses/generateScore',
    params
  })
}

export function getCoursesListByTeacherAPI(){
  return request({
    url: '/courses/listByTeacher'
  })
}

export function getCoursesListByStudentAPI(){
  return request({
    url: '/courses/listByStudent'
  })
}

export function getpageCourseTeacherAPI(params) {
  return request({
    url: '/courses/getpageCourseTeacher',
    params
  })
}

export function addOrEditCourseAPI(courses) {
  return request({
    url: '/courses/addOrEditCourse',
    method: 'post',
    data: courses
  })
}

export function deleteCourseAPI(id){
  return request({
    url:`/courses/deleteCourse/${id}`,
    method: 'delete'
  })
}



